﻿<Window x:Class="FileCryt.CreateLicence"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="CreateLicence" Height="312" Width="597" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <GroupBox  Header="服务器" Grid.Row="0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="35"></RowDefinition>
                    <RowDefinition Height="35"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="150*"/>
                    <ColumnDefinition Width="100"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0"  VerticalAlignment="Center" Text="服务器硬盘序列号:"></TextBlock>
                <TextBox  Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Name="tbServerHdsn" ></TextBox>
                <Button Grid.Row="0" Grid.Column="2" Content="获取序列号" Name="btnGetServerHdsn" Click="btnGetServerHdsn_Click" VerticalAlignment="Center"/>

                <TextBlock  Grid.Row="1" Grid.Column="0" Text="授权客户端数量：" VerticalAlignment="Center"/>
                <TextBox Grid.Row="1" Grid.Column="1" Name="Txt_Count" VerticalAlignment="Center"  />
                <Button Grid.Row="1" Grid.Column="2"   Content="创建许可" VerticalAlignment="Center"  Click="btnCreate_Click"/>
            </Grid>
        </GroupBox>
        <GroupBox   Grid.Row="1" Header="客户端授权（服务器版）">
            <StackPanel Margin="0,5" Grid.Row="0" Orientation="Horizontal">
                <TextBlock Margin="5,0" Text="许可客户端数量：" VerticalAlignment="Center"/>
                <TextBox Name="Txt_ClientCount" Height="20" Width="60" VerticalAlignment="Center" Text="30"/>
                <TextBlock  Margin="5,0" Text="许可天数：" VerticalAlignment="Center"/>
                <TextBox Name="Txt_Days" Height="20" Width="60" VerticalAlignment="Center" Text="30"/>
                <TextBlock  Margin="5,0" Text="文件时效：" VerticalAlignment="Center"/>
                <TextBox Name="Txt_LicenseYxq" Height="20" Width="50" VerticalAlignment="Center" Text="3"/>
                <Button HorizontalAlignment="Right" Margin="12,0,0,0" Content="创建许可" Height="22" Width="120" Click="Btn_ServerCreate_Click"/>
            </StackPanel>
        </GroupBox>
        <GroupBox   Grid.Row="2" Header="客户端">
            <Grid >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <StackPanel Margin="0,5" Grid.Row="0" Orientation="Horizontal">
                    <TextBlock Margin="5,0" Text="许可天数：" VerticalAlignment="Center"/>
                    <TextBox Name="Txt_DayCount" Height="20" Width="80" VerticalAlignment="Center" Text="30"/>
                    <TextBlock  Margin="5,0" Text="文件时效：" VerticalAlignment="Center"/>
                    <TextBox Name="Txt_FileYxq" Height="20" Width="80" VerticalAlignment="Center" Text="3"/>
                </StackPanel>
                <StackPanel Margin="0,5" Grid.Row="1" Orientation="Horizontal">
                    <TextBlock Margin="5,0" Text="磁盘序列号：" VerticalAlignment="Center"/>
                    <TextBox Name="Txt_Sn" Height="20" Width="130" VerticalAlignment="Center" Text=""/>
                    <Button Margin="5,0"  Width="83" Content="获取序列号" Height="22" Click="Btn_GetSn_Click"/>
                </StackPanel>
                <Button Grid.Row="1" HorizontalAlignment="Right" Margin="5,0,0,0" Content="创建许可" Height="22" Width="120" Click="Btn_ClientCreate_Click"/>
            </Grid>
        </GroupBox>

    </Grid>
</Window>
